﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using AspNetCs.Model;
using System.Collections;

namespace AspNetCs.IDAL
{
    public interface IAncestralHall
    {
        /// <summary>
        /// 生成宗祠表中不存在的随机数
        /// </summary>
        /// <param name="list">不允许出现的随机数</param>
        /// <returns></returns>
        string RndNum(ArrayList list, int Rndlen);

        /// <summary>
        /// 是否存在祠堂编号
        /// </summary>
        /// <param name="AncestralHallId">祠堂编号</param>
        /// <returns></returns>
        bool IsExistAncestralHallId(string AncestralHallId);

        /// <summary>
        /// 添加宗祠
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Add(AncestralHall_Model model);

        /// <summary>
        /// 修改宗祠
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int Update(AncestralHall_Model model);

        /// <summary>
        /// 删除宗祠(物理删除)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int Delete(int id);

        /// <summary>
        /// 删除宗祠(逻辑删除)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int Hidden(int id);

        /// <summary>
        /// 获得创建的宗祠
        /// </summary>
        /// <param name="CreateId">创建者编号</param>
        /// <param name="RequeryItems">查询的字段</param>
        /// <param name="IsDel">是否查询的被删除的信息 0:没有删除的 1:删除了的 2:所有的</param>
        /// <returns></returns>
        DataTable getMyCreateAncestralHallItems(int CreateId, string RequeryItems, int IsDel);

        /// <summary>
        /// 通过编号获得宗祠详细信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        DataTable GetAncestralHallInfoById(int Id);

        DataTable GetDataTable(string filter);

        /// <summary>
        /// 设置推荐或者取消推荐
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="CancleOrIntro">1表示设置推荐 0表示取消推荐</param>
        /// <returns></returns>
        int SetIntro(int Id, int CancleOrIntro);

        /// <summary>
        /// 审核或者取消审核
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="CancleOrIntro">1表示审核 0表示取消审核</param>
        /// <returns></returns>
        int SetCheck(int Id, int CancleOrIntro);


        /// <summary>
        /// 设置背景音乐
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="MusicId"></param>
        /// <returns></returns>
        int SetMusic(int Id, int MusicId);
        AncestralHall_Model GetModel(DataRow dr);

        /// <summary>
        /// 字段更新
        /// </summary>
        /// <param name="Upfilter">不需要加“Set”关键字，更新的字段及值,不能为空值</param>
        /// <param name="filter">条件</param>
        void filterUpdate(string Upfilter, string filter);

    }
}
